package com.ruoyi;

import com.ruoyi.common.constant.RuoYiConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * 启动程序
 */
@EnableAsync
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class})
public class RuoYiApplication
{
    public static void main(String[] args)
    {
        // System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(RuoYiApplication.class, args);
    }

    public static void getContext( ConfigurableApplicationContext context){
        System.out.println("ruoYiConfig 是否存在：" + context.containsBean("ruoYiConfig"));
        RuoYiConfig ruoYiConfig = context.getBean("ruoYiConfig", RuoYiConfig.class);
        System.out.println("ruoYiConfig:" + ruoYiConfig.getVideo());
    }
}
